package cc.owoo.godpen.analysis.css;

/**
 * 选择器加属性表
 * Created by nimensei
 * 2022-06-02 上午 12:58
 */
public record SelectorProperty(Selector selector, Property property) {
    /**
     * 序列化样式表
     *
     * @param string  序列化字符串
     * @param retract 缩进
     * @param format  是否格式化代码
     */
    public void stringify(StringBuilder string, String retract, boolean format) {
        if (string == null)
            return;
        if (!selector.stringify(string, retract, format))
            return;
        if (format)
            string.append(' ');
        property.stringify(string, retract, format, false);
    }
}
